package com.stone.config;

import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.servlet.MultipartConfigElement;

/**
 * Created by stone on 17-5-19.
 */
@Configuration
public class CatchConfig {

    @Bean
    public MultipartConfigElement multipartConfigElement(){

        MultipartConfigFactory factory = new MultipartConfigFactory();
        //文件最大
        factory.setMaxFileSize("1000000000000MB"); //KB,MB
        /// 设置总上传数据总大小
        factory.setMaxRequestSize("1000000000000MB");
        return factory.createMultipartConfig();

    }
}
